Installation

Installation
Requirements

Problems with MinGW

  • I tested tons of things.

  • Deleted the .rustup folder from users/caior/ and reinstalled Rust using rustup.

    • It worked, but I’m not sure if that alone solved it.

Build for GCC
  1. MSYS2 .

    • "MSYS2 is a collection of tools and libraries providing you with an easy-to-use environment for building, installing and running native Windows software."

    • "MSYS2 provides up-to-date native builds for GCC, mingw-w64, CPython, CMake, Meson, OpenSSL, FFmpeg, Rust, Ruby, etc."

    • "You will probably want to install some tools like the mingw-w64 GCC to start compiling projects. Run the following command:"

      • In the MSYS2 terminal:

        • pacman -S mingw-w64-x86_64-gcc .

          • .

        • pacman -S mingw-w64-ucrt-x86_64-gcc .

          • Didn’t work, possibly because it installs the UCRT version.

    • Query of installations:

      • pacman -Q

  2. MinGW-w64 via Chocolatey .

    • choco install mingw

  • "~Check which gcc is being used":

    • Get-Command x86_64-w64-mingw32-gcc

MSVCRT or UCRT runtime library?
  • Traditionally, the MinGW-w64 compiler used MSVCRT  as the runtime library, which is available on all Windows versions.

  • Since Windows 10, Universal C Runtime ( UCRT ) is available as an alternative to MSVCRT.

  • Universal C Runtime can also be installed on earlier Windows versions (see: Update for Universal C Runtime in Windows ).

  • Unless you are targeting older versions of Windows, UCRT as a runtime library is the better choice, as it was written to better support recent Windows versions and provide better standards conformance (see also: Upgrade your code to the Universal CRT ).